 
import { useI18n } from 'vue-i18n'
import type { IJsonItem } from '../types'

export function useExecutorCores(): IJsonItem {
  const { t } = useI18n()

  return {
    type: 'input-number',
    field: 'executorCores',
    name: t('project.node.executor_cores'),
    span: 12,
    props: {
      placeholder: t('project.node.executor_cores_tips'),
      min: 1
    },
    validate: {
      trigger: ['input', 'blur'],
      required: true,
      validator(validate: any, value: string) {
        if (!value) {
          return new Error(t('project.node.executor_cores_tips'))
        }
      }
    }
  }
}
